﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using BLL;
using System.Text;

namespace SearchEngine
{
    public partial class GMap : System.Web.UI.Page
    {
        public double kinhdo = 106;
        public double vido = 10;
        String Id = "";
        int id = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Id = Request.QueryString["Id"].ToString();
                if (Id != "")
                {
                    id = Convert.ToInt32(Id);
                }
                if (id != 0)
                {
                    DataTable dt = SearchBUS.SelectOne(id);
                    StringBuilder sb = new StringBuilder();
                    sb.Append("<table>");
                    sb.Append("<tr class='thongtin'><td><b>THÔNG TIN ĐỊA ĐIỂM</b></td></tr>");
                    DataRow DRNO = null;
                    foreach(DataRow dr in dt.Rows)
                    {
                         DRNO=dr;
                        sb.Append("<tr class='tendichvu'><td>" + dr["TenDiaDiem"]+"</td></tr>");
                        sb.Append(" <tr class='diachi'><td > <span>Địa chỉ: "+dr["SoNha"]+" "+ dr["TenDuong"]+", phường "+dr["TenPhuong"]+", quận "+dr["TenQuanHuyen"]+" , "+dr["TenTinhThanh"]+"</span></td></tr>");
                        sb.Append("<tr><td class='loaihinh'> Loại hình: " + dr["TenDichVu"] + "</td></tr>");
                        sb.Append("<input id='kinhdo' type='hidden' value='" + dr["KinhDo"] + "' /><input id='ten' type='hidden' value='" + dr["TenDiaDiem"] + "' /> <input id='vido' type='hidden' value='" + dr["ViDo"] + "'/>");
                    }
                    sb.Append(" </table>");
                    LBHIENTHIKETQUA.Text = sb.ToString();
                    
                     
                }
                
                
            }
        }
    }
}
